perm filename FMUNGE.REF[UP,DOC]2 blob
sn#286689 filedate 1977-06-03 generic text, type C, neo UTF8
COMMENT ⊗ VALID 00009 PAGES
C REC PAGE DESCRIPTION
C00001 00001
C00002 00002 FMUNGE: A font hacking program.
C00003 00003 Reading and writing fonts:
C00005 00004 Font tables and memory:
C00007 00005 Other miscellaneous commands:
C00009 00006 The format of star/dot files:
C00011 00007 W:23,0 A sample star/dot glyph (W from NGR25)
C00012 00008 The rest of the BNF:
C00015 00009 Caveat:
C00016 ENDMK
C⊗;
FMUNGE: A font hacking program.
FMUNGE is a hack for playing with fonts. It's primary purpose
is to put characters into a text file where they can be edited with
your favorite text editor (ETV, SOS, TECO, ???). It can also perform,
as I will describe, miscellaneous other transformations on your fonts.
The program, when started, begins by displaying a short list
of the available commands. A star prompt requests a command.
The rest of this document describes the syntax and semantics of the various
commands.
Reading and writing fonts:
The first class of commands (Get and Put) are used for reading
and writing a font (.FNT file) from memory. The syntax and semantics are:
G{<table number>}<fontname> Read (get) the requested font into table
<table number>.
P{<table number>}<fontname> Write (put) the font in table <table number>
onto the file <fontname>.
I{<table number>}<charlist>{<altmode><fontname>}
Read (input) the requested characters from
font file <fontname> into table <table number>.
Unlike the G command, I doesn't erase the
previous characters already in that table.
To transfer between the internal font format of FMUNGE, and editable
form, (henceforth "Star/Dot" format) the Read and Write commands are used:
W{table number>}<charlist>{<altmode><filename>}
Write the requested characters from font <table
number> onto the file <filename> in star/dot format.
R{table number>}<charlist>{<altmode><filename>}
Read the requested characters from the star/dot
file, into the font table.
Font tables and memory:
Perhaps some explanation of font tables is in order. FMUNGE
believes in the existence of three font tables, null, ', and " (0, 1 & 2).
Thus, the command:
G'FIX25<cr>
reads FIX25.FNT[XGP,SYS] into table 1 (unless you have a FIX25.FNT on your
alias area).
This reading takes place into FMUNGE's "memory". Occassionally,
from insertions and deletions, FMUNGE's memory will fill up, and a garbage
collection will ensue. You'll be notified of this. If there isn't enough
memory to store all of your current fonts, FMUNGE will ask you, in turn,
if it can delete some. If you refuse, it may delete some anyway, though
anything deleted will be saved as a temporary font.
If FMUNGE's memory is too small to handle your problem, get REF to
make a bigger version for you.
Other miscellaneous commands:
@<filename> Read commands from <filename>. Nesting of
command files is permitted upto some depth
(about six).
@→<filename> Write (some) of the usual output onto <filename>.
Don't ask me what good this command is, but it's
there anyway.
A<charname>←<charname> Assignment command. For instance,
Ak'←W"
takes and makes the glyph of k in table one the same
as the glyph of W from table 2.
C{<table number>} Change some of the font characteristics of that
font (font height, message, height above baseline.)
D{<table number>} Delete that font.
X Extended commands. Unfortunately, none of them
have been implemented yet.
B Call BAIL (if your version of FMUNGE has bail
loaded.) If you know what you're doing, there
are useful things you can do from inside BAIL.
H, ? Redisplay the help info.
E Exit back to the monitor.
The format of star/dot files:
Each character has a page to itself. The first line of the page
has the form:
<char>:<character width>,<left kern> <comment>
Blank characters are ignored. For the syntax of <char>, see the BNF
on page 8.
You can then skip some blank lines before the glyph definition.
The rest of the page defines the character. The first non-blank line
determines the raster width of the character. Periods, spaces are interpreted
as "undark" points; tabs are converted to the appropriate number of spaces,
and all other printing characters are "dark" points. Lines after the first
need not extend to the full width of the character (and characters beyond that
width are ignored). The next page of this file is a sample star/dot glyph.
W:23,0 A sample star/dot glyph (W from NGR25)
.......................
**.......***.......**..
**.......***.......**..
**.......***.......**..
**.......***.......**..
***.....*****.....***..
***.....**.**.....***..
.**.....**.**.....**...
.**.....**.**.....**...
.***...***.***...***...
.***...***.***...***...
..**...**...**...**....
..**...**...**...**....
..***.***...***.***....
..***.***...***.***....
...**.**.....**.**.....
...**.**.....**.**.....
...*****.....*****.....
....***.......***......
....***.......***......
.......................
The rest of the BNF:
Items in braces are optional. Items in brackets are descriiptive.
* indicates 0 or more repetitions of that item. Spaces and tabs are ignored
on input; <return>, <altmode> and <formfeed> are delimiters.
<table number> ::= ' | "
<fontname> ::= [Any legal SAIL file name. Default extension = ".FNT".
If the operation is a read operation, then the font
will also be sought on [XGP,SYS]. FMUNGE will not
write on [XGP,SYS] unless you explicitly request it
(or are aliased to [XGP,SYS]). ]
<filename> ::= [Any legal file name. If FMUNGE has used a file with
this command before, and you fail to specify a file,
then the previous file will be used. Default on star/dot
files is ".CHR", on command files ".CMD", and on log
files (you guessed it), ".LOG". Often, a request for a
<filename> that is answered with a null line aborts that
process.]
<charlist> ::= <char>* [A null <charlist> indicates every character.]
<charname> ::= <char>{<table number>}
<char> ::= [most of the characters on the keyboard] | #<ascii number>
[note that the characters ' and ", if the first items of a
charlist, might get you into trouble].
<altmode> ::= [the altmode key]
<character width>::= [a decimal number indicating the Logical width of this
character. See FIND A FONT if you don't understand this.]
<left kern> ::= [a decimal number indicating the left kern of this character.]
Caveat:
There are bound to be some more bugs in this program. Complain if
you find any. Use at your own risk. As I stated originally, it's a hack.
I wrote it to do something for me; if it's useful for you, fine.
There is lots more that could be added to this program. I might eventually
get around to it. I might not. If there's something you especially want, I
might get around to it sooner. Let me know.
Bob Filman